<div class="editcate_top">
    <h2>Thêm sản phẩm</h2>
    <a href = "javascript:void(0)" onclick ="document.getElementById('div_action').style.display='none';document.getElementById('fade').style.display='none'">
        <img src="<?php echo admin_img('close.png');?>" class="png" />
    </a>
</div>
<div class="editcate_ct">
<form name="form_product" id="form_product" action="<?php echo base_url_admin("products/add")?>" method="post" enctype="multipart/form-data" >
    <ul>
    	<div id="div_message"></div>
        <li class="end">
            <input type="button" name="cancel" value="Đóng" class="btn" onclick="document.getElementById('div_action').style.display='none';document.getElementById('fade').style.display='none'" />
            <input type="button" name="submit" value="Lưu" class="btn" onclick="add_ajax();" />
        </li>
    	<li>
        	<span class="left2">Tên sản phẩm <font color="red">(*)</font>:</span>
                <span class="right2">
                    <input type="text" name="txt_name" id="txt_name" value="" style="width:50%;" />
                </span>
        </li>
        <li>
        	<span class="left2">Mã sản phẩm <font color="red">(*)</font>:</span>
                <span class="right2">
                    <input type="text" name="txt_code" id="txt_code" value="" style="width:30%;" />
            </span>
        </li>
        <li>
            <span class="left2">Loại sản phẩm <font color="red">(*)</font>:</span>
            <span class="right2">
	        	<select id="cmb_product_type" name="cmb_product_type" style="width:50%; height:30px; overflow:auto; line-height:22px;">
		        		<?php foreach($product_type as $pro_type):?>
		        			<option value="<?php echo $pro_type->id;?>"><?php echo $pro_type->name;?></option>
		        		<?php endforeach;?>
	            </select>
            </span>
        </li>
        <li>
        	<span class="left2">Hãng sản xuất<font color="red">(*)</font>:</span>
                <span class="right2">                    
                    <select id="cmb_company" name="cmb_company" style="width:50%; height:30px; overflow:auto; line-height:22px;">
		        		<?php foreach($company as $com):?>
		        			<option value="<?php echo $com->id;?>"><?php echo $com->name;?></option>
		        		<?php endforeach;?>
	            </select>
            </span>
        </li>
        <li>
        	<span class="left2">Nước sản xuất<font color="red">(*)</font>:</span>
                <span class="right2">
                    <input type="text" name="txt_country" id="txt_country" value="" style="width:50%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Mô tả sản phẩm<font color="red">(*)</font>:</span>
                <span class="right2">                    
                    <textarea cols="60" rows="10" id="txt_description" name="txt_description" ></textarea>
            </span>
        </li>
        <li>
        	<span class="left2">Hạn bảo hành<font color="red">(*)</font>:</span>
                <span class="right2">
                    <input type="text" name="txt_warranty" id="txt_txt_warranty" value="" style="width:30%;" /> (Năm)
            	</span>
        </li>
        <li>
        	<span class="left2">Công suất điện<font color="red">(*)</font>:</span>
                <span class="right2">
                    <input type="text" name="txt_electric_power" id="txt_electric_power" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Công suất lạnh<font color="red">(*)</font>:</span>
                <span class="right2">
                    <input type="text" name="txt_cool_power" id="txt_cool_power" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Kích thước:</span>
                <span class="right2">
                    <input type="text" name="txt_size" id="txt_size" value="" style="width:50%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Trọng lượng cục lạnh:</span>
                <span class="right2">
                    <input type="text" name="txt_cool_weight" id="txt_cool_weight" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Trọng lượng cục nóng:</span>
                <span class="right2">
                    <input type="text" name="txt_hot_weight" id="txt_hot_weight" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Kích thước cục lạnh:</span>
                <span class="right2">
                    <input type="text" name="txt_cool_size" id="txt_cool_size" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Kích thước cục nóng:</span>
                <span class="right2">
                    <input type="text" name="txt_hot_size" id="txt_hot_size" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Điện năng tiêu thụ:</span>
                <span class="right2">
                    <input type="text" name="txt_power_consumption" id="txt_power_consumption" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Khả năng hút ẩm:</span>
                <span class="right2">
                    <input type="text" name="txt_absorb_moisture" id="txt_absorb_moisture" value="" style="width:30%;" />
            </span>
        </li>
        <li>
        	<span class="left2">Tính năng:</span>                
        </li>
        <li>
        	<div align="center">
        	<textarea id="txt_features" name="txt_features"  style="width:100%; height:200px;"></textarea>
        			<script type="text/javascript">
                            var ADMIN_IMAGE_INPUT_TEXT = '0';
                            $(function (){

                                    if($('#image').val() == '') {
                                    $('#image_thumb').attr('src', '<?php echo admin_img('no_image.gif')?>');
                                }
                                CKEDITOR.config.width = 450;
                                CKEDITOR.config.height = 400;
                                CKEDITOR.replace('txt_features',{
                                    toolbar : 'MyToolbar',
                                        filebrowserBrowseUrl : '<?php echo base_url().'public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=File';?>',
                                        filebrowserUploadUrl  :'<?php echo base_url().'public/ckfinder/ckfinder.html?type=File';?>',
                                        filebrowserBrowseUrl : '<?php echo base_url().'public/ckfinder/ckfinder.html?type=Images';?>',
                                        filebrowserImageUploadUrl :'<?php echo base_url().'public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';?>'
                               });
                            });
                   </script>
        	</div>        	
        </li>
        <li>
        	<span class="left2">Giá bán:</span>
                <span class="right2">
                    <input type="text" name="txt_price" id="txt_price" value="" style="width:50%;" /> (VNĐ)
            	</span>
        </li>        
        
        <li>
        	<span class="left2">Trạng thái:</span>
                <span class="right2">
                    <select style="width:130px;" name="status" id="status">
                      <option value="yes">Kích hoạt</option>
                      <option value="no">Chưa kích hoạt</option>
                    </select>
                </span>
        </li>
        <li class="end">
            <input type="button" name="cancel" value="Đóng" class="btn" onclick="document.getElementById('div_action').style.display='none';document.getElementById('fade').style.display='none'" />
            <input type="button" name="submit" value="Lưu" class="btn" onclick="add_ajax();" />
        </li>
    </ul>
 </form>
</div>